﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iSun.Model
{
    /// <summary>
    /// 用于管理表单自定义使用
    /// </summary>
    [Serializable]
    [lite.Table]
    [Table("Set_Table", "TableID")]
    public  class SysTable : BaseEntity
    {
 
        public SysTable()
        {
           
        }
         [lite.Column]
        public Guid TableID
        {
            get;
            set;
        }
        /// <summary>
        /// 表名
        /// </summary>
         [lite.Column]
        public string TableName
        {
            get;
            set;
        }

        /// <summary>
        /// 别名
        /// </summary>
         [lite.Column]
        public string AlaisName
        {
            get;
            set;
        }

        /// <summary>
        /// 是否是视图
        /// </summary>
         [lite.Column]
        public string Is_View
        {
            get;
            set;
        }

        /// <summary>
        /// 说明备注
        /// </summary>
         [lite.Column]
        public string Notes
        {
            get;
            set;
        }
    }

    /// <summary>
    /// 用于管理`表字段
    /// </summary>
    [Serializable]
    [lite.Table]
    [Table("Set_TableField","TableFieldID")]
    public class SysTableField : BaseEntity
    {
        public SysTableField(string TableName,Guid TableID)
        {
            this.TableID = TableID;
            this.TableName = TableName;
            this.FieldName = "";
            this.FiledType = "varchar";
            this.Length = "";
        }

        public SysTableField() { }
         [lite.Column]
        public Guid  TableFieldID
        {
            get;set;
        }
         [lite.Column]
        public Guid TableID
        {
            get;set;
        }
         [lite.Column]
        public string TableName
        {
            get;
            set;
        }
         [lite.Column]
        public string Is_PrimaryKey
        {
            get;
            set;
        }
         [lite.Column]
        public string FieldName
        {
            get;set;
        }
         [lite.Column]
        public string FiledType 
        {
            get;
            set;
        }
         [lite.Column]
        public string Length
        {
            get;
            set;
        }
         [lite.Column]
        public string Is_CustomDefine
        {
            get;set;
        }
         [lite.Column]
        public string Is_Null
        {
            get;
            set;
        }
         [lite.Column]
        public string Notes
        {
            get;set;
        }
    }
            ///// <summary>
        ///// 显示名
        ///// </summary>
        //public string DisplayName
        //{
        //    get;
        //    set;
        //}

        ///// <summary>
        ///// 标签文本
        ///// </summary>
        //public string LabelText
        //{
        //    get;
        //    set;
        //}

        ///// <summary>
        ///// 是否默认
        ///// </summary>
        //public string Is_Defalut
        //{
        //    get;
        //    set;
        //}
}
